package net.da.client.common.ui.widget;

import com.google.gwt.user.client.ui.ClickListener;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.Label;

public class BreadCrumb extends Composite {
	
	private HorizontalPanel hp = new HorizontalPanel();
	private String startLabel = "Path:";
	private String linkDelimeter = ">";
	
	public BreadCrumb(){
				
		//setWidget(fp);
		initWidget(hp);
		hp.add(new Label(startLabel));		
	}
	
			
	public void addActiveButtonLink(String name, ClickListener clickListener){
		
		HTML label = new HTML("<u>" + name + "</u>");		
		label.addClickListener(clickListener);
		hp.add(label);
		addDelimeter();		
	}
	
	public void addInactiveButtonLink(String name){
		
		Label label = new Label(name);
		hp.add(label);
		addDelimeter();
	}
	
	private void addDelimeter(){
		
		Label label = new Label(linkDelimeter);		
		hp.add(label);		
	}
		
}
